Optimal. Leaf size=144 \[ -\frac{a^2 \cos ^{m+2}(c+d x) \text{Hypergeometric2F1}\left (1,m+2,m+3,-\frac{a \cos (c+d x)}{b}\right )}{b d (m+2) \left (a^2-b^2\right )}+\frac{\cos ^{m+2}(c+d x) \text{Hypergeometric2F1}(1,m+2,m+3,-\cos (c+d x))}{2 d (m+2) (a-b)}-\frac{\cos ^{m+2}(c+d x) \text{Hypergeometric2F1}(1,m+2,m+3,\cos (c+d x))}{2 d (m+2) (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.431573, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4397, 2837, 961, 64} \[ -\frac{a^2 \cos ^{m+2}(c+d x) \, _2F_1\left (1,m+2;m+3;-\frac{a \cos (c+d x)}{b}\right )}{b d (m+2) \left (a^2-b^2\right )}+\frac{\cos ^{m+2}(c+d x) \, _2F_1(1,m+2;m+3;-\cos (c+d x))}{2 d (m+2) (a-b)}-\frac{\cos ^{m+2}(c+d x) \, _2F_1(1,m+2;m+3;\cos (c+d x))}{2 d (m+2) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4397
Rule 2837
Rule 961
Rule 64
Rubi steps
\begin{align*} \int \frac{\cos ^m(c+d x)}{a \sin (c+d x)+b \tan (c+d x)} \, dx &=\int \frac{\cos ^{1+m}(c+d x) \csc (c+d x)}{b+a \cos (c+d x)} \, dx\\ &=-\frac{a \operatorname{Subst}\left (\int \frac{\left (\frac{x}{a}\right )^{1+m}}{(b+x) \left (a^2-x^2\right )} \, dx,x,a \cos (c+d x)\right )}{d}\\ &=-\frac{a \operatorname{Subst}\left (\int \left (\frac{\left (\frac{x}{a}\right )^{1+m}}{2 a (a+b) (a-x)}-\frac{\left (\frac{x}{a}\right )^{1+m}}{2 a (a-b) (a+x)}+\frac{\left (\frac{x}{a}\right )^{1+m}}{(a-b) (a+b) (b+x)}\right ) \, dx,x,a \cos (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{x}{a}\right )^{1+m}}{a+x} \, dx,x,a \cos (c+d x)\right )}{2 (a-b) d}-\frac{\operatorname{Subst}\left (\int \frac{\left (\frac{x}{a}\right )^{1+m}}{a-x} \, dx,x,a \cos (c+d x)\right )}{2 (a+b) d}-\frac{a \operatorname{Subst}\left (\int \frac{\left (\frac{x}{a}\right )^{1+m}}{b+x} \, dx,x,a \cos (c+d x)\right )}{\left (a^2-b^2\right ) d}\\ &=\frac{\cos ^{2+m}(c+d x) \, _2F_1(1,2+m;3+m;-\cos (c+d x))}{2 (a-b) d (2+m)}-\frac{\cos ^{2+m}(c+d x) \, _2F_1(1,2+m;3+m;\cos (c+d x))}{2 (a+b) d (2+m)}-\frac{a^2 \cos ^{2+m}(c+d x) \, _2F_1\left (1,2+m;3+m;-\frac{a \cos (c+d x)}{b}\right )}{b \left (a^2-b^2\right ) d (2+m)}\\ \end{align*}
Mathematica [A] time = 0.390116, size = 106, normalized size = 0.74 \[ \frac{\cos ^{m+2}(c+d x) \left (-2 a^2 \text{Hypergeometric2F1}\left (1,m+2,m+3,-\frac{a \cos (c+d x)}{b}\right )+b (a+b) \text{Hypergeometric2F1}(1,m+2,m+3,-\cos (c+d x))-b (a-b) \text{Hypergeometric2F1}(1,m+2,m+3,\cos (c+d x))\right )}{2 b d (m+2) (a-b) (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.547, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \cos \left ( dx+c \right ) \right ) ^{m}}{a\sin \left ( dx+c \right ) +b\tan \left ( dx+c \right ) }}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{m}{\left (c + d x \right )}}{a \sin{\left (c + d x \right )} + b \tan{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (d x + c\right )^{m}}{a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]